﻿CREATE PROCEDURE [dbo].[proc_Finance_RunningAccount_Delete]
	(
		@RId uniqueidentifier
	)
AS
Begin
	
	--在删除Finance_RunningAccount表中记录之前，需要先删除Finance_RunningAccountCopy中相应记录 1.10加
	DELETE FROM Finance_RunningAccountCopy WHERE 
	Finance_RunningAccountCopy.RId=(SELECT id FROM Finance_RunningAccount  WHERE Finance_RunningAccount.RId=@RId and Finance_RunningAccount.renling=1)
	
	Delete From Finance_RunningAccount Where RId=@RId and renling=1
End
	RETURN
